package com.zsj.interceptor;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description:
 * @Author:
 * @Date:
 */
@Configuration
public class WebConfiguration implements WebMvcConfigurer {

    @Bean
    UidInterceptor uidInterceptor() {
        return new UidInterceptor();
    }


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(uidInterceptor()).addPathPatterns("/**");
    }
}
